﻿using System;
using UnityEngine;

namespace RootMotion
{
	// Token: 0x020000F8 RID: 248
	public abstract class Singleton<T> : MonoBehaviour where T : Singleton<T>
	{
		// Token: 0x170000A0 RID: 160
		// (get) Token: 0x06000714 RID: 1812 RVA: 0x000068A8 File Offset: 0x00004AA8
		public static T instance
		{
			get
			{
				return Singleton<T>.sInstance;
			}
		}

		// Token: 0x06000715 RID: 1813 RVA: 0x000068AF File Offset: 0x00004AAF
		public virtual void Awake()
		{
			if (Singleton<T>.sInstance != null)
			{
				Debug.LogError(base.name + "error: already initialized", this);
			}
			Singleton<T>.sInstance = (T)((object)this);
		}

		// Token: 0x04000675 RID: 1653
		public static T sInstance;
	}
}
